#include <rtthread.h>
#include "E53_SF1.h"
#include "drv_lcd.h"


int main(void)
{
    float ppm;
    E53_SF1_Init();
    while(1)
    {
        E53_SF1_Read_Data(&ppm);

        lcd_show_string(5, 100,  24, "Smoke:%.1f ppm    ", ppm);
        rt_kprintf("Smoke data:%.2f ppm\r\n", ppm);

       
        if (ppm > 30) {
        E53_SF1_Beep_Set(ON);
        E53_SF1_LED_Set(ON);
        } else {
        E53_SF1_Beep_Set(OFF);
        E53_SF1_LED_Set(OFF);
        }
        rt_thread_mdelay(2000);
    }
}
